package lab02.Text13;

public class School extends ComputerAverage {
    //行为：直接总分除以总科目。
    double data[];
    School() {
    }
    School(double data[]) {
        this.data = data;
    }

    @Override
    double average(double[] data) {
        double sum = 0;
        for (int i = 0; i < data.length; i++) {
            sum += data[i];
        }
        sum = sum / data.length;
        return sum;

    }
}
